<template>
	<div>
		{{count}}
		<button @click="$store.commit('reduce',a)">按钮</button>
	</div>
</template>
<script type="text/javascript">
	import { mapState, mapMutations } from 'vuex';
	export default {
		data() {
			return {
				a:10,
			}
		},
		created() {

		},
		methods: {
			...mapMutations([
				'add', 'reduce'
			]),

		},
//		...mapGetters(["count"])
		computed: {
			...mapState(["count"]),
//			count() {
//				return this.$store.getters.count;
//			}
		},
		mounted() {

		}
	}
</script>
<style lang="scss" scoped>

</style>